<?php
    $servername = "localhost";
    $username = "root";
    $password = "root";
    $name="seven";
    // 创建连接
    $conn = mysqli_connect($servername, $username, $password,$name);
   
    // 检测连接
    if (!$conn) {
        die("Connection failed: " . mysqli_connect_error());
    }
?>